<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>v-on:click</title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			{{message}}  
			<button v-on:click="fun1('aaa')">vue的onclick</button>
		</div>
	</body>
	<script>
		//view model
		new Vue({
			el: '#app',
			data: {
				message: ''
			},
			methods: {
			    fun1: function(message) {
			        this.message = message;
				}
			}
		});
	</script>
</html> 